from django.conf.urls.defaults import *
from django.views.generic.list import ListView
from hackprofile.views.edit import EditContacts, EditInfo, \
    ModerateContacts, ModerateInfo
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required

edit_contacts = url(
    regex=r'^edit/contacts/$',
    view=EditContacts.as_view(),
    name='edit-contacts'
)

edit_info = url(
    regex=r'^edit/info/$',
    view=EditInfo.as_view(),
    name='edit-info'
)

moderate_contacts = url(
    regex=r'^edit/contacts/(?P<user_id>\d+)/$',
    view=ModerateContacts.as_view(),
    name='moderate-contacts'
)

moderate_info = url(
    regex=r'^edit/info/(?P<user_id>\d+)/$',
    view=ModerateInfo.as_view(),
    name='moderate-info'
)

from hackprofile.models import Hacker
from django.views.generic.detail import DetailView
from hackprofile.views import ShowProfile, ShowMyProfile


show_profile = url(
    regex=r'^show/(?P<pk>\d+)/$',
    view=login_required(ShowProfile.as_view(       
        template_name='show_profile.html')),
    name='show-profile'
)

show_my_profile = url(
    regex=r'^$',
    view=login_required(ShowMyProfile.as_view(
        template_name='show_profile.html')),
    name='show-my-profile'
)


urlpatterns = patterns('', edit_contacts, edit_info,
     moderate_contacts, moderate_info, show_profile, show_my_profile )

